package api.sea;

import conf.Url;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import util.HttpClientUtils;
import util.ResponseData;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class AffixUploadApi {
    private static final Logger logger=LoggerFactory.getLogger(AffixUploadApi.class);
    private static final String affix_upload_url= Url.Base_Url+"consumer/aliyun/oss/file/warehouse";
    public ResponseData affix_upload(String path) throws IOException {
        logger.info("url={}",affix_upload_url);
        Map<String,String> file=new HashMap<>();
        file.put("file","./data/"+path);
        logger.info("map={}", file);
        return  HttpClientUtils.upload_file(affix_upload_url,null,file);
    }

    public static void main(String[] args) {

    }
}
